/*
 * Copyright (c) 2018-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

namespace TencentCloud.Bsca.V20210811.Models
{
    using Newtonsoft.Json;
    using System.Collections.Generic;
    using TencentCloud.Common;

    public class ComponentVulnerabilitySummary : AbstractModel
    {
        
        /// <summary>
        /// 用于匹配漏洞的PURL
        /// 注意：此字段可能返回 null，表示取不到有效值。
        /// </summary>
        [JsonProperty("PURL")]
        public PURL PURL{ get; set; }

        /// <summary>
        /// 该组件是否包含修复漏洞的官方补丁
        /// </summary>
        [JsonProperty("CanBeFixed")]
        public bool? CanBeFixed{ get; set; }

        /// <summary>
        /// 修复漏洞的组件版本号
        /// </summary>
        [JsonProperty("FixedVersion")]
        public string FixedVersion{ get; set; }

        /// <summary>
        /// 漏洞影响的组件版本号
        /// </summary>
        [JsonProperty("AffectedVersion")]
        public string AffectedVersion{ get; set; }

        /// <summary>
        /// 漏洞影响组件
        /// </summary>
        [JsonProperty("AffectedComponent")]
        public string AffectedComponent{ get; set; }

        /// <summary>
        /// 漏洞在该产品中的风险等级
        /// <li>Critical</li>
        /// <li>High</li>
        /// <li>Medium</li>
        /// <li>Low</li>
        /// </summary>
        [JsonProperty("RiskLevel")]
        public string RiskLevel{ get; set; }


        /// <summary>
        /// For internal usage only. DO NOT USE IT.
        /// </summary>
        public override void ToMap(Dictionary<string, string> map, string prefix)
        {
            this.SetParamObj(map, prefix + "PURL.", this.PURL);
            this.SetParamSimple(map, prefix + "CanBeFixed", this.CanBeFixed);
            this.SetParamSimple(map, prefix + "FixedVersion", this.FixedVersion);
            this.SetParamSimple(map, prefix + "AffectedVersion", this.AffectedVersion);
            this.SetParamSimple(map, prefix + "AffectedComponent", this.AffectedComponent);
            this.SetParamSimple(map, prefix + "RiskLevel", this.RiskLevel);
        }
    }
}

